import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: () => import("../views/home/home.vue"),
  },
  {
    path: "/home",
    component: () => import("../views/home/home"),
  },
  {
    path: "/type/:id",
    component: () => import("../views/type/type"),
  },
  {
    path: "/cart",
    component: () => import("../views/cart/cart"),
  },
  {
    path: "/demo1",
    component: () => import("../views/demo/demo1"),
  },
  {
    path: "/demo2",
    component: () => import("../views/demo/demo2"),
  },
  {
    path: "/my",
    component: () => import("../views/my/my"),
  },
  {
    path: "/shoppingdetail/:productId",
    component: () => import("../views/home/shoppingdetail"),
  },
  {
    path: "/login",
    component: () => import("../views/my/login"),
  },
  {
    path: "/myorder",
    component: () => import("../views/my/myorder"),
  },
  {
    path: "/isorder",
    component: () => import("../views/my/isorder"),
  },
  {
    path: "/shezhi",
    component: () => import("../views/my/shezhi"),
  },
  {
    path: "/order",
    component: () => import("../views/cart/order"),
  },
  {
    path: "/adress",
    component: () => import("../views/cart/adress"),
  },
  {
    path: "/AddressEdit",
    component: () => import("../views/cart/AddressEdit"),
  },
  {
    path: "/Edit",
    component: () => import("../views/cart/Edit"),
  },
  {
    path: "/pay",
    component: () => import("../views/cart/pay"),
  },
  
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
